package com.heima.day531_字符串;

import java.util.Scanner;

public class Student {

    private String name;
    private String age;

    public Student() {
    }

    public Student(String name, String age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }




    public static void main(String[] args) {

        //键盘录入
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入学生信息");
        String stuInfo=sc.nextLine();

        //根据逗号切割字符串，得到（张三）（23）遇到英文点.要加\\特殊说明(\\.)
        String[]sArr=stuInfo.split("\\.");

        Student stu=new Student(sArr[0],sArr[1]);

        System.out.println(stu.getName()+"..."+stu.getAge());


    }


}
